<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateProjectsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_PId}" for="PId" />
                    <h:inputText id="PId" value="#{projectsController.selected.PId}" title="#{bundle.CreateProjectsTitle_PId}" required="true" requiredMessage="#{bundle.CreateProjectsRequiredMessage_PId}"/>
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_name}" for="name" />
                    <h:inputText id="name" value="#{projectsController.selected.name}" title="#{bundle.CreateProjectsTitle_name}" />
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_description}" for="description" />
                    <h:inputTextarea rows="4" cols="30" id="description" value="#{projectsController.selected.description}" title="#{bundle.CreateProjectsTitle_description}" />
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_snapShotUrl}" for="snapShotUrl" />
                    <h:inputText id="snapShotUrl" value="#{projectsController.selected.snapShotUrl}" title="#{bundle.CreateProjectsTitle_snapShotUrl}" />
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_url}" for="url" />
                    <h:inputText id="url" value="#{projectsController.selected.url}" title="#{bundle.CreateProjectsTitle_url}" />
                    <h:outputLabel value="#{bundle.CreateProjectsLabel_status}" for="status" />
                    <h:inputText id="status" value="#{projectsController.selected.status}" title="#{bundle.CreateProjectsTitle_status}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{projectsController.create}" value="#{bundle.CreateProjectsSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{projectsController.prepareList}" value="#{bundle.CreateProjectsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateProjectsIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
